package com.atguigu.service.impl;

import com.atguigu.dao.ProductDao;
import com.atguigu.domain.Product;
import com.atguigu.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductDao productDao;


    @Override
    public void saveProduct(Product product) {
        productDao.saveProduct(product);
    }

    @Override
    public List<Product> findAllProduct(int page, int size) {
        return productDao.findAllProduct();
    }
}
